﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PServiceBus.MessageProxy {
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class ESBTransportAttribute : Attribute {
        public Type TransportType { get; internal set; }

        public ESBTransportAttribute(Type type) {
            if (type == null) throw new ArgumentNullException("type");
            if (!typeof(PServiceBus.Core.Interface.ITransport).IsAssignableFrom(type))
                throw new InvalidOperationException("type must be a type of ITransport");
            TransportType = type;
        }
    }
}
